class Table:

    def __init__(self, width, height, xsize, ysize) -> None:
        self.picture = []
        for i in range(height*ysize + 1):
            self.picture.append("")
            for j in range(width*xsize + 1):
                if i % height == 0:
                    if j % width == 0:
                        self.picture[i] = self.picture[i] + "+ "
                    else:
                        self.picture[i] = self.picture[i] + "— "
                else:
                    if j % width == 0:
                        self.picture[i] = self.picture[i] + "| "
                    else:
                        self.picture[i] = self.picture[i] + "  "

    def __str__(self) -> str:
        output_str = ""
        for i in self.picture:
            output_str += i
            output_str += "\n"
        return output_str

table = Table(5, 3, 10, 5)
print(table)
